<!DOCTYPE html>
<html lang="en" xmlns:v-bind="http://www.w3.org/1999/xhtml" xmlns:v-model="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="/js/vue.js"></script>
</head>
<body>
<div id="app">
    <h1 v-if="age>18" style="color: green;">欢迎光临</h1>
    <h1 v-else-if="age<18" style="color: red;">未满18禁止入内</h1>
    <h1 v-else style="color: yellow;">请在家长陪同下观看</h1>
</div>

<script>
    var app = new Vue({
        el: '#app',
        data: {
            age:18
        }
    })
</script>
</body>
</html>